/* 
 * File:   libeap_md5.h
 * Author: plroit
 *
 * Created on June 13, 2009, 8:10 PM
 */

#ifndef _LIBEAP_MD5_H
#define	_LIBEAP_MD5_H

#include <stdio.h>

#define CHALLENGE_LEN 16

//#define CL_INITIAL_ST 1
//#define CL_WAITING_ST 5

typedef enum{
    AUTH_INITIAL,WAITING_FOR_REPLY,SUCCESS,FAILURE
}MD5_AUTH_STATE;

typedef enum{
    PEER_INITIAL,DONE
}MD5_PEER_STATE;


#ifdef	__cplusplus
extern "C" {
#endif


    typedef struct md5_chap_peer_data_st {
        char* challenge;
        int challenge_len;
        MD5_PEER_STATE state;
    } MD5_CHAP_PEER_DATA;

    typedef struct md5_chap_authenticator_data_st {
        char* challenge;
        int challenge_len;
        MD5_AUTH_STATE state;
    } MD5_CHAP_AUTHENTICATOR_DATA;



#ifdef	__cplusplus
}
#endif

#endif	/* _LIBEAP_MD5_H */

